package com.probox.common.entity.mapper.product;

import com.probox.product.api.domain.LunWenVo;
import com.probox.product.api.domain.ProductInfoVo;
import com.probox.product.api.domain.SaleProductVo;
import com.probox.common.entity.domain.product.ProductInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.probox.common.entity.domain.product.vo.ProductEditVo;
import com.probox.common.entity.domain.product.vo.ProductInfoQuery;

import java.util.HashMap;
import java.util.List;

/**
 * 商品信息Mapper接口
 *
 *
 * @date 2021-05-28
 */

public interface ProductInfoMapper extends BaseMapper<ProductInfo> {
    /**
     *  商品信息管理查询
     * @param productInfoQuery 查询参数
     * @return
     */
    public List<ProductInfoVo> selectProductList(ProductInfoQuery productInfoQuery);

    public List<LunWenVo> selectLunWenList(LunWenVo lunWenVo);
    public Integer selectLunWenCount(LunWenVo lunWenVo);

    public List<ProductEditVo> queryEditVo(Long productUid);

    public ProductInfoVo selectProduct(Long productUid);

    public List<HashMap> getGategoryProduct(Long categoryUid);

    public int updateProductStock(SaleProductVo pi);

    public int incProductDownloadCount(Long productUid);

    public int incProductBuyCount(Long productUid);

    public ProductInfoVo getTemplatePro(Long productUid);

    public void updateAndLog(ProductInfo productInfo);

    public Integer selectCountAdmin(ProductInfoQuery productInfoQuery);

}
